<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Insert title here</title>
<SCRIPT type="text/javascript" src="jquery-1.8.2.js"></SCRIPT>
<SCRIPT type="text/javascript">
<!--
function test() {
	$.ajax( {
		url: "http://localhost:8080/boardsecure/api/1.0/list.json",
		type: "get",
		dataType: "jsonp",
		jsonp: "callback",
		data: { "userId": "100020201010" },
		success: function( data ) {
			alert( $.stringify( data ) );
		},
		error: function( jqXHR, textStatus, errorThrown ) {
			alert( textStatus + " : " + errorThrown );
		},
		statusCode: {
			"401" : function() {
				alert( "Unauthorized ( Access Denied )" );
			},
			"404" : function() {
				alert( "Not Found Page" );
			}
		}		
	});
}


/**
 *		UTILS
 *
**/
////////////////////////////////////////////////////////////////////////////////////////
// log, info, warn, error, assert console out
$.each([ "log", "info", "warn", "error", "assert" ], function( i, fn ) {
    $[ fn ] = function() {
        if ( !window.console ) {
        	return;
        }
       	var f = console[fn];
       	f( arguments[0] ); 
    };
});
///////////////////////////////////////////////////////////////////////////////////////
// stringify
$.extend({
    stringify : function stringify(obj) {
        var t = typeof (obj);
        if (t != "object" || obj === null) {
            // simple data type
            if (t == "string") obj = '"' + obj + '"';
            return String(obj);
        } else {
            // recurse array or object
            var n, v, json = [], arr = (obj && obj.constructor == Array);

            for (n in obj) {
                v = obj[n];
                t = typeof(v);
                if (obj.hasOwnProperty(n)) {
                    if (t == "string") v = '"' + v + '"'; else if (t == "object" && v !== null) v = jQuery.stringify(v);
                    json.push((arr ? "" : '"' + n + '":') + String(v));
                }
            }
            return (arr ? "[" : "{") + String(json) + (arr ? "]" : "}");
        }
    }
});
//-->
</script>
</head>
<body>
<input value="테스트" type="button" onclick="test();"><br><br>
</body>
</html>